/*
 * Copyright 2016 Wealth Inc. All rights reserved.
 */
 package com.wealth.vote.entity;


import java.io.Serializable;
import java.util.Date;

import javax.persistence.Column;
import javax.persistence.Entity;
import javax.persistence.GeneratedValue;
import javax.persistence.GenerationType;
import javax.persistence.Id;
import javax.persistence.JoinColumn;
import javax.persistence.ManyToOne;
import javax.persistence.Table;

@Entity
@Table(name = "cooperative_emp")
public class CooperativeEmp implements Serializable {
	
	private static final long serialVersionUID = 1L;
	
	private Long id;
	private String name;
	private String picurl;
	private String headimg;
	private String empNo;
	private Date createTime;
	private Integer status;
	private Integer votes;
	private Cooperative cooprt;
	
	/* ---------------- method ----------------*/
	
	public CooperativeEmp(){
	}

	public CooperativeEmp(Long id){
		this.id = id;
	}

	/* ---------------- getter/setter ----------------*/
	
	
	@Id
	@GeneratedValue(strategy=GenerationType.IDENTITY)
	public Long getId() {
		return id;
	}
	
	public void setId(Long id) {
		this.id = id;
	}
	
	@Column(name = "name")
	public String getName() {
		return name;
	}
	
	public void setName(String name) {
		this.name = name;
	}
	
	@Column(name = "picurl")
	public String getPicurl() {
		return picurl;
	}
	
	public void setPicurl(String picurl) {
		this.picurl = picurl;
	}
	
	@Column(name = "headimg")
	public String getHeadimg() {
		return headimg;
	}
	
	public void setHeadimg(String headimg) {
		this.headimg = headimg;
	}
	
	@Column(name = "emp_no")
	public String getEmpNo() {
		return empNo;
	}
	
	public void setEmpNo(String empNo) {
		this.empNo = empNo;
	}
	
	@Column(name = "create_time")
	public Date getCreateTime() {
		return createTime;
	}
	
	public void setCreateTime(Date createTime) {
		this.createTime = createTime;
	}
	
	@Column(name = "status")
	public Integer getStatus() {
		return status;
	}
	
	public void setStatus(Integer status) {
		this.status = status;
	}
	
	@Column(name = "votes")
	public Integer getVotes() {
		return votes;
	}
	
	public void setVotes(Integer votes) {
		this.votes = votes;
	}
	
	
	@ManyToOne
	@JoinColumn(name="cooper_id")
	public Cooperative getCooprt() {
		return cooprt;
	}

	public void setCooprt(Cooperative cooprt) {
		this.cooprt = cooprt;
	}
	
}



